LinearGauge for ASP.NET Web Forms
Setting the Start Value
Task-Based Help > Setting the Start Value

In this topic you'll change the C1LinearGauge control's C1Gauge.Value property. The C1Gauge.Value property determines the currently selected number. By default the C1LinearGauge control starts with its C1Gauge.Value set to 0 but you can customize this number at design time, in XAML, and in code. Note that although this topic sets the C1Gauge.Value of the C1LinearGauge control, the same steps can be used to customize the C1Gauge.Value of other controls.


At Design Time

To set the C1LinearGauge control's C1Gauge.Value property at run time, complete the following steps:

  1. Click the C1LinearGauge control once to select it.
  2. Navigate to the Properties window, and enter a number, for example "20", in the text box next to the C1Gauge.Value property.

This will set the C1Gauge.Value property to the number you chose.

In XAML

For example, to set the C1Gauge.Value property add Value="20" to the <cc1:C1LinearGauge> tag so that it appears similar to the following:

To write code in Source View

<cc1:C1LinearGauge Value="20">

In Code

For example, to set the C1Gauge.Value property, add the following code to your project:

To write the code in Visual Basic:

Visual Basic
Copy Code
C1LinearGauge1.Value = 20

To write the code in C#:

Title Text
Copy Code
c1LinearGauge1.Value = 20;

Run your project and observe:

Initially the gauge's C1Gauge.Pointer will be set to the C1Gauge.Value you selected.

See Also